/*
 * fcntl.c
 *
 *  Created on: 2016-11-24
 *      Author: m
 */
#include "fcntl.h"
#include "proc.h"
#include "debug.h"

int open(const char *pathname, int flags) {
    MESSAGE msg;
    msg.type = MT_DEV_OPEN;
    MT_FS_OPEN_TYPE* p = (MT_FS_OPEN_TYPE*)msg.data;
    p->flags = flags;
    p->path = (char*)pathname;

    post(FN_BOTH, TASK_IDX_FS, &msg);
    //assert(msg.type == MT_SYSCAL_RET);
    return p->fd;
}

int close(int fd) {
    return 0;
}



